//
//  HotCollectCollectionViewCell.m
//  BeautifulShoppings
//
//  Created by GivenBmli on 16/9/14.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "HotCollectCollectionViewCell.h"
#define WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height
@implementation HotCollectCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self  = [super initWithFrame:frame];
    if (self) {
        [self creatSubview:frame];
        
    }
    
    return self;
}
- (void)creatSubview:(CGRect)frame {
    
    self.cover_image_url = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH ,HEIGHT/3*2)];
    
    
    [self.contentView addSubview:self.cover_image_url];
    
    self.name = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH/10, HEIGHT/3 *2.1, WIDTH - WIDTH/10, HEIGHT - HEIGHT/3 *2.5 )];
    
    self.name.numberOfLines = NO;
    [self.contentView addSubview:self.name];
    
    self.price = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH / 20, HEIGHT / 10 *9, WIDTH , HEIGHT /10  )];
    [self.contentView addSubview:self.price];
    UIVisualEffectView *visualView = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]];
    //visualView.backgroundColor = [UIColor blackColor];
    visualView.frame = CGRectMake(0,HEIGHT - 3 , WIDTH   , 2);
    [self.contentView addSubview:visualView];
    
    
    UIVisualEffectView *visualView2 = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]];
    //  visualView2.backgroundColor = [UIColor blackColor];
    visualView2.frame = CGRectMake(0,0, 3, HEIGHT);
    [self.contentView addSubview:visualView2];
    
    
    UIVisualEffectView *visualView3 = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]];
    // visualView3.backgroundColor = [UIColor blackColor];
    visualView3.frame = CGRectMake(WIDTH-3,0, 3, HEIGHT);
    [self.contentView addSubview:visualView3];
    
    
    
}
@end
